Optimal. Leaf size=141 \[ -\frac {8 d^3 (d g+e f)^2 \log (d-e x)}{e^3}-\frac {d x^2 \left (4 d^2 g^2+7 d e f g+2 e^2 f^2\right )}{e}-\frac {d^2 x \left (8 d^2 g^2+16 d e f g+7 e^2 f^2\right )}{e^2}-\frac {1}{2} e g x^4 (2 d g+e f)-\frac {1}{3} x^3 (d g+e f) (7 d g+e f)-\frac {1}{5} e^2 g^2 x^5 \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.18, antiderivative size = 141, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.069, Rules used = {848, 88} \[ -\frac {d x^2 \left (4 d^2 g^2+7 d e f g+2 e^2 f^2\right )}{e}-\frac {d^2 x \left (8 d^2 g^2+16 d e f g+7 e^2 f^2\right )}{e^2}-\frac {8 d^3 (d g+e f)^2 \log (d-e x)}{e^3}-\frac {1}{2} e g x^4 (2 d g+e f)-\frac {1}{3} x^3 (d g+e f) (7 d g+e f)-\frac {1}{5} e^2 g^2 x^5 \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 88
Rule 848
Rubi steps
\begin {align*} \int \frac {(d+e x)^4 (f+g x)^2}{d^2-e^2 x^2} \, dx &=\int \frac {(d+e x)^3 (f+g x)^2}{d-e x} \, dx\\ &=\int \left (-\frac {d^2 \left (7 e^2 f^2+16 d e f g+8 d^2 g^2\right )}{e^2}-\frac {2 d \left (2 e^2 f^2+7 d e f g+4 d^2 g^2\right ) x}{e}+(-e f-7 d g) (e f+d g) x^2-2 e g (e f+2 d g) x^3-e^2 g^2 x^4-\frac {8 d^3 (e f+d g)^2}{e^2 (-d+e x)}\right ) \, dx\\ &=-\frac {d^2 \left (7 e^2 f^2+16 d e f g+8 d^2 g^2\right ) x}{e^2}-\frac {d \left (2 e^2 f^2+7 d e f g+4 d^2 g^2\right ) x^2}{e}-\frac {1}{3} (e f+d g) (e f+7 d g) x^3-\frac {1}{2} e g (e f+2 d g) x^4-\frac {1}{5} e^2 g^2 x^5-\frac {8 d^3 (e f+d g)^2 \log (d-e x)}{e^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.08, size = 134, normalized size = 0.95 \[ -\frac {8 d^3 (d g+e f)^2 \log (d-e x)}{e^3}-\frac {x \left (240 d^4 g^2+120 d^3 e g (4 f+g x)+70 d^2 e^2 \left (3 f^2+3 f g x+g^2 x^2\right )+10 d e^3 x \left (6 f^2+8 f g x+3 g^2 x^2\right )+e^4 x^2 \left (10 f^2+15 f g x+6 g^2 x^2\right )\right )}{30 e^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.82, size = 176, normalized size = 1.25 \[ -\frac {6 \, e^{5} g^{2} x^{5} + 15 \, {\left (e^{5} f g + 2 \, d e^{4} g^{2}\right )} x^{4} + 10 \, {\left (e^{5} f^{2} + 8 \, d e^{4} f g + 7 \, d^{2} e^{3} g^{2}\right )} x^{3} + 30 \, {\left (2 \, d e^{4} f^{2} + 7 \, d^{2} e^{3} f g + 4 \, d^{3} e^{2} g^{2}\right )} x^{2} + 30 \, {\left (7 \, d^{2} e^{3} f^{2} + 16 \, d^{3} e^{2} f g + 8 \, d^{4} e g^{2}\right )} x + 240 \, {\left (d^{3} e^{2} f^{2} + 2 \, d^{4} e f g + d^{5} g^{2}\right )} \log \left (e x - d\right )}{30 \, e^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.16, size = 249, normalized size = 1.77 \[ -4 \, {\left (d^{5} g^{2} e^{3} + 2 \, d^{4} f g e^{4} + d^{3} f^{2} e^{5}\right )} e^{\left (-6\right )} \log \left ({\left | x^{2} e^{2} - d^{2} \right |}\right ) - \frac {1}{30} \, {\left (6 \, g^{2} x^{5} e^{12} + 30 \, d g^{2} x^{4} e^{11} + 70 \, d^{2} g^{2} x^{3} e^{10} + 120 \, d^{3} g^{2} x^{2} e^{9} + 240 \, d^{4} g^{2} x e^{8} + 15 \, f g x^{4} e^{12} + 80 \, d f g x^{3} e^{11} + 210 \, d^{2} f g x^{2} e^{10} + 480 \, d^{3} f g x e^{9} + 10 \, f^{2} x^{3} e^{12} + 60 \, d f^{2} x^{2} e^{11} + 210 \, d^{2} f^{2} x e^{10}\right )} e^{\left (-10\right )} - \frac {4 \, {\left (d^{6} g^{2} e^{4} + 2 \, d^{5} f g e^{5} + d^{4} f^{2} e^{6}\right )} e^{\left (-7\right )} \log \left (\frac {{\left | 2 \, x e^{2} - 2 \, {\left | d \right |} e \right |}}{{\left | 2 \, x e^{2} + 2 \, {\left | d \right |} e \right |}}\right )}{{\left | d \right |}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 186, normalized size = 1.32 \[ -\frac {e^{2} g^{2} x^{5}}{5}-d e \,g^{2} x^{4}-\frac {e^{2} f g \,x^{4}}{2}-\frac {7 d^{2} g^{2} x^{3}}{3}-\frac {8 d e f g \,x^{3}}{3}-\frac {e^{2} f^{2} x^{3}}{3}-\frac {4 d^{3} g^{2} x^{2}}{e}-7 d^{2} f g \,x^{2}-2 d e \,f^{2} x^{2}-\frac {8 d^{5} g^{2} \ln \left (e x -d \right )}{e^{3}}-\frac {16 d^{4} f g \ln \left (e x -d \right )}{e^{2}}-\frac {8 d^{4} g^{2} x}{e^{2}}-\frac {8 d^{3} f^{2} \ln \left (e x -d \right )}{e}-\frac {16 d^{3} f g x}{e}-7 d^{2} f^{2} x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.47, size = 175, normalized size = 1.24 \[ -\frac {6 \, e^{4} g^{2} x^{5} + 15 \, {\left (e^{4} f g + 2 \, d e^{3} g^{2}\right )} x^{4} + 10 \, {\left (e^{4} f^{2} + 8 \, d e^{3} f g + 7 \, d^{2} e^{2} g^{2}\right )} x^{3} + 30 \, {\left (2 \, d e^{3} f^{2} + 7 \, d^{2} e^{2} f g + 4 \, d^{3} e g^{2}\right )} x^{2} + 30 \, {\left (7 \, d^{2} e^{2} f^{2} + 16 \, d^{3} e f g + 8 \, d^{4} g^{2}\right )} x}{30 \, e^{2}} - \frac {8 \, {\left (d^{3} e^{2} f^{2} + 2 \, d^{4} e f g + d^{5} g^{2}\right )} \log \left (e x - d\right )}{e^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.11, size = 351, normalized size = 2.49 \[ -x^2\,\left (\frac {d^3\,g^2+6\,d^2\,e\,f\,g+3\,d\,e^2\,f^2}{2\,e}+\frac {d\,\left (\frac {3\,d^2\,e\,g^2+6\,d\,e^2\,f\,g+e^3\,f^2}{e}+\frac {d\,\left (e\,g\,\left (3\,d\,g+2\,e\,f\right )+d\,e\,g^2\right )}{e}\right )}{2\,e}\right )-x^3\,\left (\frac {3\,d^2\,e\,g^2+6\,d\,e^2\,f\,g+e^3\,f^2}{3\,e}+\frac {d\,\left (e\,g\,\left (3\,d\,g+2\,e\,f\right )+d\,e\,g^2\right )}{3\,e}\right )-x^4\,\left (\frac {e\,g\,\left (3\,d\,g+2\,e\,f\right )}{4}+\frac {d\,e\,g^2}{4}\right )-x\,\left (\frac {d\,\left (\frac {d^3\,g^2+6\,d^2\,e\,f\,g+3\,d\,e^2\,f^2}{e}+\frac {d\,\left (\frac {3\,d^2\,e\,g^2+6\,d\,e^2\,f\,g+e^3\,f^2}{e}+\frac {d\,\left (e\,g\,\left (3\,d\,g+2\,e\,f\right )+d\,e\,g^2\right )}{e}\right )}{e}\right )}{e}+\frac {d^2\,f\,\left (2\,d\,g+3\,e\,f\right )}{e}\right )-\frac {\ln \left (e\,x-d\right )\,\left (8\,d^5\,g^2+16\,d^4\,e\,f\,g+8\,d^3\,e^2\,f^2\right )}{e^3}-\frac {e^2\,g^2\,x^5}{5} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.60, size = 150, normalized size = 1.06 \[ - \frac {8 d^{3} \left (d g + e f\right )^{2} \log {\left (- d + e x \right )}}{e^{3}} - \frac {e^{2} g^{2} x^{5}}{5} - x^{4} \left (d e g^{2} + \frac {e^{2} f g}{2}\right ) - x^{3} \left (\frac {7 d^{2} g^{2}}{3} + \frac {8 d e f g}{3} + \frac {e^{2} f^{2}}{3}\right ) - x^{2} \left (\frac {4 d^{3} g^{2}}{e} + 7 d^{2} f g + 2 d e f^{2}\right ) - x \left (\frac {8 d^{4} g^{2}}{e^{2}} + \frac {16 d^{3} f g}{e} + 7 d^{2} f^{2}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________